﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Smart
{
    public interface IMessageInfo
    {
        int Status { get; set; }
        void Add(string msg);
    }

    public class MessageInfo : IMessageInfo
    {
        public MessageInfo()
        {
            JoinToken = Environment.NewLine;
        }

        protected List<string> msgList = new List<string>();

        public int Status { get; set; }

        public string JoinToken { get; set; }

        public void Add(string msg)
        {
            msgList.Add(msg);
        }

        public override string ToString()
        {
            return string.Join(JoinToken, msgList.ToArray());
        }
    }
}
